package com.example.service.reserveImpl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.domain.reserve;
import com.example.mapper.reserve.reserveQuery;
import com.example.service.reserve.reserveService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class reserveServiceImpl extends ServiceImpl<reserveQuery, reserve> implements reserveService {

    @Resource
    private reserveQuery reserveQuery;


    @Override
    public boolean insert(reserve reserve) {
        return reserveQuery.insert(reserve)>0;
    }

    @Override
    public boolean delete(String user_openid, int articlesid) {
        return reserveQuery.delete(user_openid,articlesid)>0;
    }

    @Override
    public boolean delete(String user_openid) {
        return reserveQuery.deleteAll(user_openid)>0;
    }
}
